/*******************************************************************************
 * Copyright (c) 2007 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.extensionpoints.transformation.definition;

import java.util.Map;

import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.debug.core.ILaunchConfiguration;

/**
 * Context for a transformation. 
 * This context holds information like source object,
 * target container, etc.
 */
public interface ITransformationContext {

	/**
	 * Get the transformation defined in extension
	 * and selected for use in "Run" dialog
	 * @return the transformation
	 */
	public Transformation getTransformation();
	
	/**
	 * Get the target container for the transformation
	 * @return container for transformation result
	 */
	public IContainer getContainer();
	
	/**
	 * Get the source of the transformation (a UML file in general)
	 * @return source of the transformation
	 */
	public Object getSource();

	/**
	 * Get path of the log file
	 * @return log file path
	 */
	public String getLog();
	
	/**
	 * Get the synchronization boolean (synchronization means that the 
	 * transformation is automatically launched when the model is saved)
	 * The synchronization may also retrieve changes in generated files and try
	 * to update the model accordingly to these changes.
	 * @return synchronization boolean
	 */
	public boolean isSynchronized();
	
	/**
	 * Get the project that owns the container
	 * @return the project owning generation container
	 */
	public IProject getProject();
	
	/**
	 * Get the map that stores the local properties of the transformation
	 * @return the properties
	 */
	public Map<Object, String> getProperties();
	
	/**
	 * Get the launch configuration
	 * @return the current configuration
	 */
	public ILaunchConfiguration getConfiguration();
}
